package xyz.yuanjilu.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import xyz.yuanjilu.dao.CommunityHouseDao;
import xyz.yuanjilu.entity.CommunityHouseEntity;
import xyz.yuanjilu.service.CommunityHouseService;



@Service("communityHouseService")
public class CommunityHouseServiceImpl implements CommunityHouseService {
	@Autowired
	private CommunityHouseDao communityHouseDao;
	
	@Override
	public CommunityHouseEntity queryObject(Long id){
		return communityHouseDao.queryObject(id);
	}
	
	@Override
	public List<CommunityHouseEntity> queryList(Map<String, Object> map){
		return communityHouseDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return communityHouseDao.queryTotal(map);
	}
	
	@Override
	public void save(CommunityHouseEntity communityHouse){
		communityHouse.setCreateTime(new Date());
		communityHouseDao.save(communityHouse);
	}
	
	@Override
	public void update(CommunityHouseEntity communityHouse){
		communityHouseDao.update(communityHouse);
	}
	
	@Override
	public void delete(Long id){
		communityHouseDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		communityHouseDao.deleteBatch(ids);
	}
	
}
